package cn.hyatt.auth.dto.systemDept;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 部门保存DTO
 *
 * @author hyatt
 */
@Getter
@Setter
@Schema(name = "部门保存DTO")
public class SystemDeptSaveDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 42L;

    @Schema(description = "上级部门")
    private Long parentId;

    @NotNull
    @Schema(description = "部门名称")
    private String name;

    @NotNull
    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "部门负责人")
    private String leader;

    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$")
    @Schema(description = "联系电话")
    private String phone;

    @Email
    @Schema(description = "邮箱")
    private String email;

    @NotNull
    @Schema(description = "是否启用：true启用 false未启用")
    private Boolean enabled;

}